
/**
 * <p>Title: TaskNodeModel</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) xio.name 2006</p>
 * @author Ray
 */
function TaskNodeModel() {
    this.base = MetaNodeModel;
    this.base();

    //
    this.setText("TaskNode");

    //
    this.setSize(new Dimension(80, 30));
	//extended properties
	this.task = new Task();
}
TaskNodeModel.prototype = new MetaNodeModel();

//
TaskNodeModel.prototype.toString = function () {
	//task node
    return "[TaskNode:" + this.getText() + "]";
};
//extended function for node  by Ray
// set task
TaskNodeModel.prototype.setTask = function (task) {
    this.task=task;
}
//get task
TaskNodeModel.prototype.getTask = function () {
    return this.task;
}
//
TaskNodeModel.prototype.type = MetaNodeModel.TYPE_TASK_NODE;
//Jbpm Node Type
TaskNodeModel.prototype.jbmptype = MetaNodeModel.TYPE_JBPM_TASK_NODE;

//define task structure   by Ray

function Task(){
    this.taskName = "task1";
	this.description = "";
	this.duedate = "";
	this.controller = new Controller();
	this.assignment = new Assignment();
	this.event = new Event();
}
//define controller structure 
function Controller(){
	this.variables = new Array();
}
//define assignment structure 
function Assignment(){
	this.actorId = "";
	this.pooledActors = "";
	this.groupId = "";
}
//define event structure
function Event(){
	this.actionname_enter = "";
	this.actionname_leave = "";
	this.actionclass_enter = "";
	this.actionclass_leave = "";
	this.mapping_enter = "";
	this.mapping_leave = "";
    this.create = "";
	this.assign = "";
	this.start = "";
	this.end = "";
}